package com.ftg.learn.chapter07.util;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Map;

/**
 * @author kangjx
 */
@Mapper
public interface MapperUtil {

    @SelectProvider(type = ProviderUtil.class,method = "createSql")
    List<Map<String,Object>> manyTableForList(@Param("sql") String sql);

    @SelectProvider(type = ProviderUtil.class,method = "createSql")
    Map<String,Object> manyTableForOne(@Param("sql") String sql);

    @SelectProvider(type = ProviderUtil.class,method = "createConutSql")
    int getCount(@Param("sql") String sql);


}
